﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import flash.utils.*;

    public class SPublicPet2 extends IMessageBase
    {
        public var entityId:SEntityId;
        public var ownerEntityId:SEntityId;
        public var name:String;
        public var specialName:String;
        public var code:int;
        public var sharpId:int;
        public var lastAdvanceSuccessDt:Date;
        public var bless:int;
        public var advanceNum:int;
        public var blessExpiredDt:Date;
        public var currentGrowthNum:int;
        public var totalGrowthNum:int;
        public var currentTalentNum:int;
        public var totalTalentNum:int;
        public var advanceReturn:int;
        public var shapeCardStatus:int;
        public var fightMode:int;
        public var state:int;
        public var skillIds:Dictionary;
        public const _type:int = 150;
        public static var _regist:SPublicPet2 = new SPublicPet2(true);

        public function SPublicPet2(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SPublicPet2();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            this.ownerEntityId.__write(param1);
            param1.writeString(this.name);
            param1.writeString(this.specialName);
            param1.writeInt(this.code);
            param1.writeInt(this.sharpId);
            param1.writeDate(this.lastAdvanceSuccessDt);
            param1.writeInt(this.bless);
            param1.writeInt(this.advanceNum);
            param1.writeDate(this.blessExpiredDt);
            param1.writeInt(this.currentGrowthNum);
            param1.writeInt(this.totalGrowthNum);
            param1.writeInt(this.currentTalentNum);
            param1.writeInt(this.totalTalentNum);
            param1.writeInt(this.advanceReturn);
            param1.writeByte(this.shapeCardStatus);
            param1.writeInt(this.fightMode);
            param1.writeShort(this.state);
            DictIntIntHelper.write(param1, this.skillIds);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.ownerEntityId = new SEntityId();
            this.ownerEntityId.__read(param1);
            this.name = param1.readString();
            this.specialName = param1.readString();
            this.code = param1.readInt();
            this.sharpId = param1.readInt();
            this.lastAdvanceSuccessDt = param1.readDate();
            this.bless = param1.readInt();
            this.advanceNum = param1.readInt();
            this.blessExpiredDt = param1.readDate();
            this.currentGrowthNum = param1.readInt();
            this.totalGrowthNum = param1.readInt();
            this.currentTalentNum = param1.readInt();
            this.totalTalentNum = param1.readInt();
            this.advanceReturn = param1.readInt();
            this.shapeCardStatus = param1.readByte();
            this.fightMode = param1.readInt();
            this.state = param1.readShort();
            this.skillIds = DictIntIntHelper.read(param1);
            return;
        }// end function

    }
}
